package Entities;

import java.io.Serializable;
import java.util.List;

import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name="Nombre", discriminatorType=DiscriminatorType.STRING)
@Table(name = "Area")
public class AreaBean implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue
	private int idArea;
	
	@OneToMany
	@JoinColumn(name="idEmpleado")
	private List<EmpleadoBean> empleados;


	public List<EmpleadoBean> getEmpleados() {
		return empleados;
	}
	public void setEmpleados(List<EmpleadoBean> empleados) {
		this.empleados = empleados;
	}
	public int getIdArea() {
		return idArea;
	}
	public void setIdArea(int idArea) {
		this.idArea = idArea;
	}
}
